﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Alma.Infrastructure;
using System.Data.Linq.Mapping;
using Alma.Enums;

namespace Alma.Models
{
    [Table(Name = "ITSkills")]
    public class ITSkillInfo : NotificationObject
    {
        public ITSkillInfo() { }

        public ITSkillInfo(AccountInfo account)
        {
            AccountGuid = account.Guid;
        }

        public ITSkillInfo(string _accountGuid)
        {
            AccountGuid = _accountGuid;
        }

        #region Fields
        private int id;
        private string accountGuid;
        private string title;
        private int experience = 1;
        private ItSkillLevelValue level = ItSkillLevelValue.None;
        #endregion

        #region Properties
        [Column(Name = "Id", IsPrimaryKey = true, CanBeNull = false, IsDbGenerated = true, DbType = "INT NOT NULL Identity", AutoSync = AutoSync.OnInsert)]
        public int Id
        {
            get { return id; }
            set
            {
                id = value;
                RaisePropertyChanged(() => Id);
            }
        }

        [Column]
        public string AccountGuid
        {
            get { return accountGuid; }
            set
            {
                accountGuid = value;
                RaisePropertyChanged(() => AccountGuid);
            }
        }

        [Column]
        public string Title
        {
            get { return title; }
            set
            {
                title = value;
                RaisePropertyChanged(() => Title);
            }
        }

        [Column]
        public int Experience
        {
            get { return experience; }
            set
            {
                experience = value;
                RaisePropertyChanged(() => Experience);
            }
        }

        [Column]
        public ItSkillLevelValue Level
        {
            get { return level; }
            set
            {
                level = value;
                RaisePropertyChanged(() => Level);
            }
        }
        #endregion
    }
}
